Skip to content

[SDK] Support independent programmatic configuration#4240

Draft
dbarker wants to merge 17 commits into
open-telemetry:mainfrom
dbarker:sdk_configuration_core_and_tests
Draft

[SDK] Support independent programmatic configuration#4240
dbarker wants to merge 17 commits into
open-telemetry:mainfrom
dbarker:sdk_configuration_core_and_tests

Conversation

@dbarker

@dbarker dbarker commented Jul 11, 2026

Copy link
Copy Markdown
Member

Fixes #4134 and follow up from ##3655 (review)

Break out the programmatic configuration to its own library so it can be used without the ryml dependency.

[edit - crossed out items that were broken out to separate PRs]

Changes

  • Creates the programmatic configuration target (configuration_core)
  • Adds configuration_core to the CMake install tests
  • Adds deprecated names to components and deprecates the *builder components since they only depend on the SDK now and do not bring in dependencies.
  • Adds programmatic_configuration_test.cc
  • Fix issues found with the new test
    • LoggerConfigurator supporting min severity and trace based fields
    • Initialize members of config classes to the spec default constants.
    • Set the default parent based root sampler to always_on
    • Set the default sampler to parent based always on
    • Set all batch processor options that the user configured
    • Handle default metric stream aggregation
  • Fix the cppcoreguidelines-pro-type-member-init warnings in configuration and sdk files used by the tests.
  • Update INSTALL doc for the configuration targets

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.31%. Comparing base (c8189c0) to head (2c50cfd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4240   +/-   ##
=======================================
  Coverage   81.31%   81.31%           
=======================================
  Files         445      445           
  Lines       18857    18857           
=======================================
  Hits        15331    15331           
  Misses       3526     3526           
Files with missing lines Coverage Δ
...k/include/opentelemetry/sdk/metrics/meter_config.h 100.00% <ø> (ø)
sdk/src/configuration/registry.cc 62.62% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…scale, test crash due to setting global providers to null, missing targets and files in the fetch content test
@dbarker dbarker added the pr:do-not-merge This PR is not ready to be merged. label Jul 12, 2026
@dbarker

dbarker commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

This PR will be broken up into multiple PRs (will edit with PR links).

  1. Tests for SdkBuilder, ConfiguredSdk, and integration tests for programmatic configuration along with fixes to the SdkBuilder they exposed.
  2. Move spec defaults from the configuration_parser.cc to each configuration struct.
  3. Add CMake support for deprecating components and update the policy
  4. CMake separation of configuration_core and configuration
  5. CMake component cleanup and deprecation of the "builder" components since the sdk will now include the builder interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:do-not-merge This PR is not ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Programmatic Configuration without YAML dependencies

1 participant